package cn.trud._1add.controller;

import cn.trud._1add.pojo.dto.UserRegDTO;
import cn.trud._1add.pojo.entity.User;
import cn.trud._1add.pojo.vo.UserListVO;
import cn.trud._1add.response.JsoonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("用户模块")
@Slf4j
@RestController
@RequestMapping(" /v1/users/")
public class UserController {

    @Autowired
    public UserController userController;
    @ApiOperation("注册模块")
    @PostMapping("reg")
    public JsoonResult reg(@RequestBody @Validated UserRegDTO userRegDTO){
        log.debug("userRegDTO:"+userRegDTO);
     UserListVO userListVO= userController.selectByUsername(userRegDTO.getUsername())



    }


}
